package com.boctech.yxt.commonsutils.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

public class CustomException extends RuntimeException {

    private int code;

    private String message;

    public CustomException(ExceptionType type, String message){
        this.code = type.getCode();
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
